<template>
  <div>
    <a-card class="card" :bordered="false" :style="`min-height: ${cardMinHeight}px;`">

      <!--弹窗0 新增按钮-->
      <a-modal
          destroyOnClose
          class="addModal"
          v-model='addModal'
          width='1200px'
          :title="isAdd?'新增':title"
          @ok="handleCancel0"
          @cancel="handleCancel0"
          :bodyStyle="bodyStyle"
      >
        <a-spin :spinning="spinning">
          <div style="width: 100%;min-height: 30px;display: flex;flex-direction: row;padding: 10px 24px 10px 24px;justify-content: space-between">
            <div style="width: 100%;">
              <a-form-model   layout="inline" >
                <a-form-model-item
                    label="设备编码"
                    placeholder="输入搜索"
                    style="margin-left: 0"
                >
                  <a-input style='width: 150px;height: 32px' v-model='queryForm2.device_code' v-auth="`query`"></a-input>
                </a-form-model-item>
                <a-form-model-item
                    label="设备名称"
                    placeholder="输入搜索"
                    prop="name"
                >
                  <a-input style='width: 150px;height: 32px' v-model='queryForm2.device_name' v-auth="`query`"></a-input>
                </a-form-model-item>

                <a-form-model-item
                    label="点检日期范围"
                >
                  <a-range-picker
                      :valueFormat="'YYYY-MM-DD'"
                      style="width: 300px;"
                      :format="'YYYY-MM-DD'"
                      v-model.trim="queryForm2.dateSelect"
                      :allow-clear="true"/>
                </a-form-model-item>

                <a-form-model-item>
                  <a-button type='primary' style='height: 32px;width: 70px;text-align: center' @click="reset2" v-auth="`query`">
                    重置
                  </a-button>
                </a-form-model-item>

                <a-form-model-item>
                  <a-button type='primary' style='height: 32px;width: 70px;text-align: center' @click="filter2" v-auth="`query`">
                    搜索
                  </a-button>
                </a-form-model-item>
                <a-table
                    :columns="addColumns"
                    :data-source="addDataFilter"
                    :pagination="paginationAdd"
                    @change="onChangeAdd"
                    :showPagination="true"
                    :loading="addLoading"
                    :rowKey="(recordMain) => {return recordMain.id}"
                    :scroll="{ x: true, y: 500 }"
                    style="margin: 10px 0"
                >
                  <template slot="action" slot-scope="record">
                    <a v-auth="`query`" @click="addDetailOpen(record)">详情</a>
                  </template>
                </a-table>

              </a-form-model>

            </div>
          </div>
        </a-spin>

      </a-modal>


      <!--详情查该机器有什么么project-->
      <a-modal
          destroyOnClose
          class="addDetailModal"
          v-model='addDetailModal'
          width='1200px'
          :title="isAdd?'具体点检项目':title"
          @ok="submit"
          @cancel="addDetailHandleCancel"
          :bodyStyle="bodyStyle"
      >
        <a-spin :spinning="spinning">
          <div style="width: 100%;min-height: 30px;display: flex;flex-direction: row;padding: 10px 24px 10px 24px;justify-content: space-between">
            <div style="width: 100%;">
              <a-form-model   layout="inline" >
                <a-table
                    :columns="addDetailColumns"
                    :data-source="addDetailData"
                    :pagination="paginationAddDetail"
                    @change="onChangeAddDetail"
                    :showPagination="true"
                    :loading="addDetailLoading"
                    :rowKey="(recordMain) => {return recordMain.id}"
                    :scroll="{ x: true, y: 500 }"
                    style="margin: 10px 0"
                >
                  <template slot="action0" slot-scope="record0">
                    <a-input style='width: 150px' v-model='record0.abnormal_reason' v-auth="`query`"></a-input>
                  </template>
                  <template slot="action1" slot-scope="record1">
                    <a-select
                        style='width: 100px'
                        allowClear
                        v-model.trim='record1.result'
                        v-auth="`query`"
                    >
                      <a-select-option
                          v-for='item in resultList'
                          :key='item.code'
                          :value='item.code'
                      >{{item.description}}</a-select-option>
                    </a-select>
                  </template>
                </a-table>
              </a-form-model>

            </div>
          </div>
        </a-spin>

      </a-modal>


      <page-head-area>
        <div class="extra" style="width: 260px;display: flex;justify-content: space-around">
<!--          <a-badge count="9">-->
            <a-button icon="plus-circle" v-auth="`insert`" @click="add" style="background-color: #fff;border: none;margin-left: 10px;width: 70px;height: 35px;">新增</a-button>
<!--          </a-badge>-->

          <a-popconfirm title="批量删除?" @confirm="deleteSelect">
            <a-button icon="delete" v-auth="`delete`" style="background-color: #fff;border: none;margin-left: 10px;width: 70px;height: 35px;">删除</a-button>
          </a-popconfirm>
          <a-popconfirm title="批量审核?" @confirm="auditSelect">
          <a-button icon="audit"  style="background-color: #fff;border: none;margin-left: 10px;width: 70px;height: 35px;">审核</a-button>
          </a-popconfirm>

        </div>
      </page-head-area>

      <div class="queryBox">
        <a-form-model layout="inline" :model='queryForm'  class='query' style='display: flex;flex-wrap: wrap;'>
          <a-form-model-item
              class='optionTitle'
              label="设备编码"
              style="margin-left: 0"
          >
            <a-input style='width: 200px;height: 32px' v-model='queryForm.device_code'  v-auth="`query`"></a-input>
          </a-form-model-item>
          <a-form-model-item
              class='optionTitle'
              label="设备名称"
              prop="name"
          >
            <a-input style='width: 200px;height: 32px' v-model='queryForm.device_name'  v-auth="`query`"></a-input>
          </a-form-model-item>


          <a-form-model-item
              label="状态"
          >
            <a-select
                style='width: 150px'
                allowClear
                v-model.trim='queryForm.status'
                v-auth="`query`"
            >
              <a-select-option
                  v-for='item in planStatusList'
                  :key='item.code'
                  :value='item.code'
              >{{item.description}}</a-select-option>
            </a-select>
          </a-form-model-item>

          <a-form-model-item
              label="日期范围"
          >
            <a-range-picker
                :valueFormat="'YYYY-MM-DD'"
                style="width: 300px;"
                :format="'YYYY-MM-DD'"
                v-model.trim="queryForm.dateSelect"
                :allow-clear="true"/>
          </a-form-model-item>

          <a-form-model-item>
            <a-button type='primary' style='height: 32px;width: 70px;text-align: center' @click="reset" v-auth="`query`">
              重置
            </a-button>
          </a-form-model-item>
          <a-form-model-item>
            <a-button type='primary' style='height: 32px;width: 70px;text-align: center' @click="filter" v-auth="`query`">
              搜索
            </a-button>
          </a-form-model-item>
        </a-form-model>
      </div>
      <div class="dataBox">
        <a-table
            :columns="columns"
            :data-source="data"
            :pagination="false"
            :loading="tableLoading"
            :rowKey="(recordMain) => {return recordMain.id}"
            :scroll="{ x: 1000, y: 500 }"
            :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
        >
          <template slot="action" slot-scope="record">
              <a v-auth="`query`">详情</a>
          </template>
        </a-table>

      </div>

      <a-pagination
          @change="onChangePage"
          @showSizeChange="showSizeChange"
          :total="pagination.total"
          :showSizeChanger="true"
          :showQuickJumper="true"
          :defaultPageSize="pagination.defaultPageSize"
          :pageSize="pagination.page_size"
          :pageSizeOptions="pagination.pageSizeOptions"
          :current="pagination.current"
          :showTotal="pagination.showTotal"
          style="width: 100%;display: flex;flex-direction: row;justify-content: flex-end;margin-top: 15px"
      ></a-pagination>
    </a-card>
  </div>
</template>

<script>

import {mapGetters} from "vuex";
import PageHeadArea from "../module/pageHeadArea.vue";
import pagination from "ant-design-vue/lib/pagination";
import storage from "store";
import {DEPT_ID, ORGANIZATION_ID, USER_TOKEN} from "@/store/mutation-types";
import axios from "axios";
import moment from "moment";
import {
  file_import, file_upload,
  get_employee_list,
  get_extended_define, get_asset_file_list, get_supplier, get_unit_list, download_file,
  get_organization_list,
  delete_asset, get_asset_list, save_asset, update_asset,
  get_category_type_list, get_organization_profile_list, get_template_list, update_extend
} from "@/services/manage";
import {
  deleteDeviceInspection,
  deleteDeviceRepair,
  getCurrentUserInfo,
  getDeviceList,
  getUserNameById,
  listDeviceInspectionAll,
  listDeviceInspectionPlan,
  listDeviceInspectionPlanByUserId,
  listDeviceInspectionProject,
  listDeviceInspectionProjectRelation, saveDeviceInspection, saveDeviceInspectionProjectResult
} from "../../utils/interface";
import {message} from "ant-design-vue";
import {list_device_inspection_all} from "../../services/inspection";
const data = []

const addData = []
const addDetailData=[]

const columns = [
  { title: '点检单号', width: 120, align:'center',dataIndex: 'code', key: 'code'},
  { title: '设备编码', width: 120, align:'center',dataIndex: 'device_code', key: 'device_code'},
  { title: '设备名称', width: 120, align:'center',dataIndex: 'device_name', key: 'device_name'},
  { title: '保养日期', width: 120, align:'center',dataIndex: 'inspection_time', key: 'inspection_time'},
  { title: '状态', width: 120, align:'center',dataIndex: 'status_name', key: 'status_name'},
  { title: '点检人', width: 120, align:'center',dataIndex: 'user_in_charge_name', key: 'user_in_charge_name'},
  {
    title: '操作',
    align:'center',
    key: 'operation',
    fixed: 'right',
    width: 180,
    scopedSlots: { customRender: 'action' }
  }
]

const addColumns = [
  { title: '序号', width: 120, align:'center',dataIndex: 'id', key: 'id'},
  { title: '计划单号', width: 120, align:'center',dataIndex: 'code', key: 'code'},
  { title: '设备编码', width: 120, align:'center',dataIndex: 'device_code', key: 'device_code'},
  { title: '设备名称', width: 120, align:'center',dataIndex: 'device_name', key: 'device_name'},
  { title: '点检时间', width: 120, align:'center',dataIndex: 'inspection_time', key: 'inspection_time'},
  {
    title: '操作',
    align:'center',
    key: 'operation',
    fixed: 'right',
    width: 180,
    scopedSlots: { customRender: 'action' }
  }]

const addDetailColumns=[
  { title: '序号', width: 120, align:'center',dataIndex: 'id', key: 'id'},
  { title: '项目编码', width: 120, align:'center',dataIndex: 'code', key: 'code'},
  { title: '项目名称', width: 120, align:'center',dataIndex: 'name', key: 'name'},
  {
    title: '异常原因',
    align:'center',
    key: 'operation',
    width: 180,
    scopedSlots: { customRender: 'action0' }
  },
  {
    title: '结果',
    align:'center',
    key: 'operation',
    width: 120,
    scopedSlots: { customRender: 'action1' }
  }
]

export default {
  name: "userAuthority",
  components: {PageHeadArea},
  data() {
    return {
      resultList:[
        { code: 0, description: "ok" },
        { code: 1, description: "NG" }
      ],
      record:{},
      addDetailColumns,
      addDetailData,
      addDataFilter:[],
      selectedRowKeys:[],
      planStatusList:[
        {code:null,description: '不限'},
        { code: 0, description: "未完成" },
        { code: 1, description: "已完成" }],
      addData,
      addLoading:false,
      addDetailLoading:false,
      addColumns,
      tableLoading01: false,
      axiosSource: null,
      tabKey: '1',
      title:'',
      tabBarGutter: 0,
      tabBarStyle: {
        color: 'rgba(0, 0, 0, 0.85)'
      },
      bodyStyle: {
        'padding': '0px 24px 0px 24px',
        'font-size': '14px',
        'line-height': '1.5',
        'word-wrap': 'break-word',
      },
      cardMinHeight: 0,
      queryForm: {
        device_code: undefined,
        device_name: undefined,
        status: undefined,
        dateSelect: [],
      },
      queryForm2: {
        device_code: undefined,
        device_name: undefined,
        dateSelect: [],
      },
      statusList: [
        // {id: 1, name: '待采购', code: '0', type: 'use_status'},
        {id: 1, name: '正常运行', code: '1',type: 'use_status'},
        {id: 2, name: '不正常运行', code: '2',type: 'use_status'},
      ],
      data,
      columns,
      pagination: {
        total: 0,
        page_size: 10,
        defaultPageSize: 10,
        page: 1,
        current: 1,
        showSizeChanger: true,
        showQuickJumper: true,
        showTotal: total => `共 ${total} 条记录`,
        pageSizeOptions: ['10', '20', '50', '100', '500'],
      },
      tableLoading: false,
      addModal: false,
      addDetailModal:false,
      canBeEdited: false, //是否可编辑
      isAdd: false, //是否为新增
      spinning: false,

      detailModal:false, //详情弹窗
      canBeQuery:false, //是否可查询

      maintenance_detailsModal:false,
      key1Pagination: {
        total: 0,
        page_size: 4,
        defaultPageSize: 4,
        page: 1,
        current: 1,
        showSizeChanger: true,
        showQuickJumper: true,
        showTotal: total => `共 ${total} 条记录`,
        pageSizeOptions: ['4', '8', '10', '20', '50'],
      },
      paginationAdd:{
        total: 0,
        page_size: 4,
        defaultPageSize: 4,
        page: 1,
        current: 1,
        showSizeChanger: true,
        showQuickJumper: true,
        showTotal: total => `共 ${total} 条记录`,
        pageSizeOptions: ['4', '8', '10', '20', '50'],
      },
      paginationAddDetail:{
        total: 0,
        page_size: 4,
        defaultPageSize: 4,
        page: 1,
        current: 1,
        showSizeChanger: true,
        showQuickJumper: true,
        showTotal: total => `共 ${total} 条记录`,
        pageSizeOptions: ['4', '8', '10', '20', '50'],
      }
    }
  },
  watch: {},
  authorize: {
    add: 'insert',
    getAssetLedgerList: 'query',
    reset: 'query',
    query: 'query',
    detail: 'query',
    edit: 'update',
    del: 'delete',
    check: 'check',
  },
  computed: {
    ...mapGetters(['getCardMinHeight']),
  },
  created() {
    this.cardMinHeight = this.getCardMinHeight
  },
  async mounted() {
    this.axiosSource = axios.CancelToken.source();


    await this.initialize()

  },
  methods: {
    async addDetailOpen(record) {
      this.addDetailModal=true
      this.addDetailData=[]
      this.addDetailLoading=true
      console.log(record)
      this.record = record
      await this.getRelationProject(record.device_id)
      this.addDetailLoading=false

    },
    onChangePage (page, pageSize) {
      this.pagination.current = page
      this.pagination.page_size = pageSize
      this.pagination.page = page
      this.initialize()
    },
    showSizeChange(current, size){
      this.pagination.page_size = size
      this.pagination.current = current
      this.pagination.page = current
      this.initialize()
    },
    async getRelationProject(device_id) {
      await listDeviceInspectionProjectRelation({'device_id': device_id}).then(async res => {
        if (res === 'NoData' || res === 'Error') {
          this.addDetailData = []
        } else {
          for (const it of res) {
            let searchProject = await listDeviceInspectionProject({'id': it.inspection_project_id})
            searchProject[0]['abnormal_reason']=undefined
            searchProject[0]['result']=undefined
            this.addDetailData.push(searchProject[0])
          }
          console.log(this.addDetailData)
        }

      })
    },
    async deleteSelect() {
      for (const item of this.selectedRowKeys) {
        await deleteDeviceInspection({'id': item})
      }
      this.selectedRowKeys = []
      message.success('删除成功')
      await this.initialize()
    },
    async auditSelect() {
      for (const item of this.selectedRowKeys) {
        //审核-->修改状态 todo
      }
      this.selectedRowKeys = []
      message.success('审核成功')
      await this.initialize()
    },
    onSelectChange(selectedRowKeys){
      // console.log('selectedRowKeys changed: ', selectedRowKeys);
      this.selectedRowKeys = selectedRowKeys
    },
    reset2(){
      this.paginationAdd.page = 1
      this.paginationAdd.current = 1
      this.paginationAdd.page_size = 10
      this.addLoading = true
      this.clearAddParams()
      this.addDataFilter = this.addData
      this.addLoading  = false;
    },
    filter2(){
      this.paginationAdd.page = 1
      this.paginationAdd.current = 1
      this.paginationAdd.page_size = 10
      this.addLoading = true
      const [startDate, endDate] = this.queryForm2.dateSelect;
      this.addDataFilter = this.addData.filter(item => {
        // 检查每个条件是否满足
        return (
            (this.queryForm2.device_code ? item.device_code.includes(this.queryForm2.device_code) : true) &&
            (this.queryForm2.device_name ? item.device_name.includes(this.queryForm2.device_name) : true) &&
            (startDate ? new Date(item.inspection_time) >= new Date(startDate) : true) &&
            (endDate ? new Date(item.inspection_time) <= new Date(endDate) : true)
        );
      });
      this.addLoading  = false;

    },
    async filter() {
      //筛选
      this.pagination.page = 1
      this.pagination.current = 1
      this.pagination.page_size = 10
      this.tableLoading = true

      await this.initialize({
        'code':this.queryForm.device_code,
        'name':this.queryForm.device_name,
        'status':this.queryForm.status,
      })
      this.tableLoading = false;
    },
    callback (key) { // assetCode
      this.tabKey = key
    },
    async initialize(params) {
      this.tableLoading = true
      this.data = []
      const paramsAll = Object.assign({}, params, {
        "page": this.pagination.page,
        "page_size": this.pagination.page_size
      });


      await list_device_inspection_all(paramsAll).then(async res => {
        if (res.data.code !== '1000') {
          this.tableLoading = false
          this.data = []
        } else {
          this.pagination.total = res.data.extension.total+(this.pagination.current-1)*this.pagination.page_size
          for (const item of res.data.data) {
            let searchDevice = await getDeviceList({'id': item.device_id})
            item['device_code'] = searchDevice[0]?.code || ''
            item['device_name'] = searchDevice[0]?.name || ''
            let searchPlan = await listDeviceInspectionPlan({'id': item.inspection_plan_id})
            item['plan_info'] = searchPlan[0]
            item['inspection_time'] = searchPlan[0]?.inspection_time || ''
            item['user_in_charge_name'] = await getUserNameById(searchPlan[0].user_in_charge)
            item['status_name'] = this.planStatusList.find(it=>it.code===item.status)?.description || ''

          }
          //日期
          if(this.queryForm.dateSelect!==undefined){
            const [startDate, endDate] = this.queryForm.dateSelect;
            res.data.data = res.data.data.filter(itemRes => {
              return (
                  (!startDate || new Date(itemRes.inspection_time) >= new Date(startDate)) &&
                  (!endDate || new Date(itemRes.inspection_time) <= new Date(endDate))
              );
            });
          }

          this.data =res.data.data
        }
      })
      this.tableLoading =false
    },
    // 分页切换
    onChange (pagination) {
      this.pagination.current = pagination.current
      this.pagination.page_size = pagination.pageSize
      this.pagination.page = pagination.current
      this.getAssetLedgerList()
    },
    // 分页切换
    onChangeKey1 (pagination) {
      this.key1Pagination.current = pagination.current
      this.key1Pagination.page_size = pagination.pageSize
      this.key1Pagination.page = pagination.current
    },
    onChangeAdd(pagination){
      this.paginationAdd.current = pagination.current
      this.paginationAdd.page_size = pagination.pageSize
      this.paginationAdd.page = pagination.current
    },
    onChangeAddDetail(pagination){
      this.paginationAddDetail.current = pagination.current
      this.paginationAddDetail.page_size = pagination.pageSize
      this.paginationAddDetail.page = pagination.current
    },
    async query() {
      this.tableLoading = true
      this.pagination.page = 1
      this.pagination.current = 0
      this.pagination.page_size = 10
      await this.initialize()
      this.tableLoading = false
    },
    reset() {
      this.queryForm = {
        device_code: undefined,
        device_name: undefined,
        status: undefined,
        dateSelect: [],

      }
      this.query()
    },
    async add() {
      this.queryForm2.dateSelect=[]
      this.addDataFilter=[]
      this.addModal = true
      this.canBeEdited = true
      this.isAdd = true
      this.spinning = false
      //获取自己的plan列表
      await this.getMyPlanList()

    },
    async getMyPlanList() {
      let plan_id_list = []
      //拿info里的inspection_plan_id
      await listDeviceInspectionAll().then(planRes=>{
        planRes.forEach(planIt=>{
          plan_id_list.push(planIt.inspection_plan_id)

        })
      })
      this.addData = []
      this.addLoading = true
      let user = await getCurrentUserInfo()
      //user_id
      let user_id = user.user_id
      await listDeviceInspectionPlanByUserId(user_id).then(async res => {
        if (res === 'NoData' || res === 'Error') {
          this.addData = []
          this.addDataFilter = []
          this.addLoading = false
        } else {
          // console.log(res)
          // console.log(plan_id_list)
          for (const it of res) {
            if(!plan_id_list.includes(it.id)){
              let searchDevice = await getDeviceList({'id': it.device_id})
              it['device_code'] = searchDevice[0]?.code || ''
              it['device_name'] = searchDevice[0]?.name || ''
              this.addData.push(it)
              this.addDataFilter.push(it)
            }
          }
          this.addLoading = false
        }


      })

    },
    edit(record) {
      this.addModal = true
      this.canBeEdited = true
      this.isAdd = false
      this.echo(record)
    },
    del(id) {
      const params = Object.assign({},{'organization_id': storage.get(ORGANIZATION_ID),'asset_id': id})
      delete_asset(params)
          .then(res => {
            if (res && res.data.code && res.data.code === '1000') {
              this.getAssetLedgerList()
            } else {
              this.$message.error('删除失败',1)
            }
          })
          .catch(err => {
            console.log(err)
            this.$message.error('删除失败',1)
          })
    },
    detail(record) {
      this.detailModal = true
      this.canBeEdited = false
      this.canBeQuery =true
      this.isAdd = false
      this.echo(record)
    },
    clearParameter() {},
    handleCancel() {
      this.tabKey = '1'
    },
    async clearAddParams() {
      this.queryForm2 = {
        device_code: undefined,
        device_name: undefined,
        dateSelect: [],
      }
      this.addData = []
      await this.getMyPlanList()
    },
    handleCancel0() {
      this.addModal = false
      this.canBeEdited = false
      this.isAdd = false
    },
    addDetailHandleCancel(){
      this.addDetailModal=false
    },
    async submit() {
      //提交
      // console.log(this.addDetailData)
      // console.log(this.record)
      let flag = true
      for (let i = 0; i < this.addDetailData.length; i++) {
        const item = this.addDetailData[i];
        if (item.abnormal_reason === undefined || item.result === undefined) {
          flag = false
          break
        }
      }
      if (flag === false) {
        message.error('请填写完整信息')
        return
      }
        //上传
        message.info("开始上传,请等待")
        console.log(this.addDetailData)
        for (const it of this.addDetailData) {
          //device_inspection
          let sumCode = this.record.code+it.code

          await saveDeviceInspection({
            'code':sumCode,
            'inspection_plan_id':this.record.id,
            'device_id':this.record.device_id,

          })
          //拿id
          let searchInspection = await listDeviceInspectionAll({
            'code':sumCode
          })
          let searchId
          for(const itS of searchInspection){
            if(it.code===sumCode){
              searchId = itS.id
              break
            }
          }
          console.log({
            'inspection_id':searchId,
            'device_id':this.record.device_id,
            'inspection_project_id':it.id,
            'abnormal_reason':it.abnormal_reason,
            'result':it.result
          })
          await saveDeviceInspectionProjectResult({
            'inspection_id':searchId,
            'device_id':this.record.device_id,
            'inspection_project_id':it.id,
            'abnormal_reason':it.abnormal_reason,
            'result':it.result
          })
        }
        message.success("上传成功")
        this.addDetailModal=false
        this.addData=[]
        this.addDataFilter=[]
        await this.getMyPlanList()
        await this.initialize()
        this.addDetailHandleCancel()

    },
  },
  beforeDestroy() {
    if (this.axiosSource) {
      this.axiosSource.cancel('Request canceled due to page navigation.');
    }
  }
}
</script>

<style scoped lang="less">

.dataBox{
  margin-top: 20px;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none; /* 隐藏滚动条 */
}

::-webkit-scrollbar {
  display: none; /* 隐藏滚动条 */
}
.hide-scrollbar {
  -ms-overflow-style: none;  /* IE 和 Edge */
  scrollbar-width: none;  /* Firefox */
  overflow-y: scroll; /* 保持内容可滚动 */
}
.demo-infinite-container {
  margin-top: 0px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: auto;
  padding: 8px 24px;
  height: 300px;
}
/deep/ .ant-form-inline .ant-form-item-with-help{
  margin-bottom: 0px;
}
/deep/ .ant-input[disabled]{
  pointer-events: none;
  color: #000000d9;
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 1;
}
/deep/ .unit .ant-select-selection--single{
  margin-left: 0px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
}
/deep/ .ant-select-disabled .ant-select-selection {
  background-color: #fff;
}
/deep/ .ant-input[disabled]{
  pointer-events: none;
  color: #000000d9;
  background-color: #fff;
  cursor: not-allowed;
  opacity: 1;
}
/deep/ .ant-input-number-disabled{
  pointer-events: none;
  color: #000000d9;
  background-color: #fff;
  cursor: not-allowed;
  opacity: 1;
}
</style>